#-*-coding:utf-8-*-
'''
Created on 2013-3-29
C:/Users/zhaoyh/workspace/sysmanager/mytoolbutton.py
@author: zhaoyh
'''
from PyQt4 import QtCore, QtGui

try:
    _fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
    _fromUtf8 = lambda s: s
class MyToolButton(QtGui.QToolButton):
    def __init__(self, parent=None):
        super(MyToolButton, self).__init__(parent)
        self.setMouseTracking(True)
        self.enterimg=''
        self.leaveimg=''
    def enterEvent(self,event):
        self.setStyleSheet(self.enterimg)
    def leaveEvent(self,event):
        self.setStyleSheet(self.enterimg)

    